import { createApp } from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/styles/element-variables.scss'
import '@/styles/index.scss'
import '@/styles/common.scss'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' // custom directives
// 导入主题变量，也可以重写主题变量
import { routeConfigStore } from '@/store/route'
import { otherRouter } from '@/router/modules/static-router.ts'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}

// 导入默认的语言
app.use(ElementPlus)
app.use(store)
app.use(router)

const routeConfig = routeConfigStore()
routeConfig.setRouteMenuData(otherRouter)

app.mount('#app')
